This repository was archived by the owner on Feb 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fhenneke
reviewed
Jun 19, 2023
|
||
userTrades.forEach((trade) => { | ||
nodes[trade.sellToken] = { address: trade.sellToken } | ||
nodes[trade.sellToken] = { address: trade.buyToken } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just from pattern matching: nodes[trade.buyToken]
in the second statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
alfetopito
added a commit
that referenced
this pull request
Jun 28, 2023
* Hackaton/tenderly data loading (#530) * chore: add getTransactionTrace and getTransactionContracts tenderly api fns * chore: add hook to fetch unfiltered tx data * Hackaton/nodes and edges (#531) * refactor: rename `traceToTransfersAndTrades` * chore: export all types from tenderly from index * feat: add getContractTrades * feat: add getNotesAndEdges * fix: use buyToken address as a key for the buyToken address * Hackaton/update graph (#532) * refactor: a tiny bit of clean up on useTxBatchTrades * chore: update graph WIP Messy commit, lots to describe and update still * fix: edge colors now match user/amm interactions * chore: pass down transfers to Node objs * chore: use different node types for dex vs token nodes * chore: use a different icon for token nodes * chore: capture eth sell transfers * refactor: remove repeated variable * chore: add map of wrapped native token addresses * chore: add link to hyper nodes * chore: show address and link when token has no symbol * chore: actually, always show link for all nodes * chore: improve edge labels * chore: add tooltip to edges * chore: replace native token node with wrapped * ore: add node type hyper * chore: add dynamic stylesheet for token images * chore: add token images to graph * filter contract trades which only route tokens (#533) --------- Co-authored-by: Felix Henneke <[email protected]> * chore: add circle and concentric layouts (#535) * Hackathon/integrate both visualizations (#537) * refactor: rename const to all caps * chore: wire up everything -- still WIP * chore: more a ton of refactorings, still not working * fix: enum comparison of same type was failing because one was a string the other a number * chore: update layout once visualization changes * fix: use proper type * chore: remove debug statements * refactor: remove unused hooks * refactor: move buildContractBasedSettlement to TransactionBatchGraph * refactor: move buildTokenBasedSettlement into settlementBuilder * refactor: move node builder fns into nodesBuilder file * refactor: move types to types file * refactor: move hooks to hooks file * chore: cache tenderly fetched data * refactor: rename contract->transfer token->trades * Merge edges for hypernodes + node tooltips (#536) * added tooltip for nodes showing balance of token * show dangeling edges * merge transfers for hyper nodes * use order information to filter for non-user trades * clean up address comments - made isInternal in Transfer optional - better sign for 0 in tool tip - tooltip can be undefined. does still render stuff though. * refactor: remove empty folder/file * fix: do not create tooltip if it doesn't exist * fix: adjust tooltip header width * refactor: simplify styles * fix: improve grid layout for trade based view * fix: always use bezier style edges for trade based view * refactor: simplify styles further * chore: make concentric layout further spread out * refactor: sort imports * chore: load tokens which are not part of any order * chore: start simple graphs in grid layout * fix: reset zoom when visualization change and keep same layout * fix: change filter logic from !== 1 to > 1 * fix: add dangling nodes back * fix: add padding on top of graph to not overlap buttons --------- Co-authored-by: Felix Henneke <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements the new nodes and edges creation fn
Still not in use/tested etc